package com.xcw.test;

import java.util.function.Consumer;

/**
 * @Author bhx
 * @Date 2022/8/9 22:24
 * @Description TODO
 */
public class ConsumerDemo {
    public static void method(String name, Consumer<String> con){
        con.accept(name);
    }

    public static void main(String[] args) {
        method("zly",(name)->{
//            System.out.println(name);
            StringBuffer stringBuffer = new StringBuffer(name);
            System.out.println(stringBuffer.reverse().toString());
        });
    }
}
